<div class="container">
	<div class="header1">
		<div class="topbar"> 
		
			<span class="topbar_login">
			<?php
	    		global $page_base;
				if( GetLoginUserID() && $page_base != 'logout' ){
					
					$mailUnreadCount = GetLetterDAO()->GetInLetterUnreadCount( GetLoginUserID() );
			?>			
				<a href="<?php echo edp_href_link(PAGENAME_USER_INFO); ?>"><?php echo GetLoginUserName(); ?> </a>
	            <a href="<?php echo edp_href_link(PAGENAME_MAIL_INBOX); ?>">站内信(<?php echo $mailUnreadCount;?>) </a>
	            <a href="<?php echo edp_href_link( PAGENAME_LOGOUT )?>">退出 </a> | 
	    	<?php } else {?>
				<a class="strong" href="<?php echo edp_href_link(PAGENAME_LOGIN);?>">登陆</a> | 
				<a class="strong" href="<?php echo edp_href_link(PAGENAME_REGISTER);?>">免费注册</a> | 
	    	<?php }?>
	    	</span>
    	
			<a href="<?php echo edp_href_link(PAGENAME_MAIN);?>">首页</a> | 
			<a href="<?php echo edp_href_link(PAGENAME_HELP, 'subpage=201');?>">新手上路</a> | 
			<a href="<?php echo edp_href_link(PAGENAME_TOP_DETAIL);?>">店铺排行榜</a> | 
			<a class="grayfont" href="<?php echo edp_href_link(PAGENAME_MAIN);?>" onclick="window.external.addFavorite(this.href,this.title);return false;" title='花开里' rel="sidebar">加入收藏</a> 
		</div>
	  	<div class="lg">
	    	<div id="logo"> 
	    		<a href="<?php echo edp_href_link(PAGENAME_MAIN);?>">
	    			<img src="<?php echo IMAGE_DIR; ?>index/logo.gif" alt="花开里" />
	    		</a> 
	    	</div>

	    	<div id="se">
	      		<div class="search ">
	       			<div class="left"> 
	       				<img src="<?php echo IMAGE_DIR; ?>index/search_m.gif" alt="搜索图标" />
	       			</div>
	    
	        		<div class="mid input">
	        		   <form id="searchform" name="searchform" action="<?php echo edp_href_link(PAGENAME_SHOP_SEARCH_RESULT); ?>">
		        			<input type="hidden" id="platid" name="platid" value="" />
		          			<select gtbfieldid="2" id="searchtype">
		          				<option selected="selected" value="<?php echo '/'.PAGENAME_SHOP_SEARCH_RESULT;?>" platid="">店铺</option>
	                          	<option value="<?php echo '/'.PAGENAME_SHOP_SEARCH_RESULT;?>" platid="100">商城</option>
	                          	<option value="<?php echo '/'.PAGENAME_PRODUCT_SEARCH_RESULT;?>" platid="">商品</option>
		          			</select>
		          			<label for="textfield"></label>
		          			<input type="text" autocomplete="off" name="q" id="keyword" value="输入店铺名、掌柜名进行搜索..." />
		          			<input class="search_btn" type="submit" value="搜 索"> 	          
	          			</form>
	          		</div>
	        		<!--搜索表单-->
	        		<div class="right">
	        			<a style="cursor: pointer;" href="<?php echo edp_href_link(PAGENAME_ADVANCED_SEARCH); ?>">高级搜索</a>
	        			<br/>
	        			<a href="<?php echo edp_href_link(PAGENAME_ABOUT, 'subpage=101');?>">使用帮助</a>
	        		</div>
	        		<div class="side">
	        			<img src="<?php echo IMAGE_DIR; ?>index/search_r.gif" alt="搜索边框" >
	        		</div>
	      		</div>
	      		<!--搜索框-->
	      		<div class="tab"> 
					<span class="strong moresfont ">热门搜索：</span>
<?php
					if($popularSearch) 
					{
						foreach($popularSearch as $key => $psearch)
						{
?>
							<a href="<?php echo edp_href_link(PAGENAME_SHOP_SEARCH_RESULT, 'q='.sconv($psearch['keyword']));?>"><?php secho($psearch['keyword']);?></a>

<?php
						}
					}
?>
		 		</div>
		 	</div>
		 </div>
	<div class="nav clear strong">
		 	<div class="nav_left"></div>
	   		<div class="menu_left">
	   			<a href="<?php echo edp_href_link(PAGENAME_INDEX); ?>">首页</a> 
	   			<a href="<?php echo edp_href_link(PAGENAME_PLATFORM,'platid=1');?>">淘宝店铺</a> 
	   			<a href="<?php echo edp_href_link(PAGENAME_PLATFORM,'platid=3');?>">拍拍店铺</a> 
	   		<!--	<a href="<?php echo edp_href_link(PAGENAME_PLATFORM,'platid=4');?>">百度有啊</a> -->
	   			<a href="<?php echo edp_href_link(PAGENAME_PLATFORM,'platid=2');?>">易趣店铺</a> 
	   			<a href="<?php echo edp_href_link(PAGENAME_PLATFORM,'platid=100');?>">购物商城</a> 
	   		</div>
	    	<!--主导航-->
	   		<div class="menu_right"> 
	   			<a href="<?php echo edp_href_link(PAGENAME_COUPON_SUMMARY);?>">优惠券<sup><img src="<?php echo IMAGE_DIR; ?>index/menu_new.gif" alt="新" /></sup></a> 
	   			<a href="<?php echo edp_href_link(PAGENAME_GIFT_SUMMARY);?>">E币换礼<sup><img src="<?php echo IMAGE_DIR; ?>index/menu_new.gif" alt="新" /></sup></a>
	   			<a href="<?php echo edp_href_link(PAGENAME_TOP_DETAIL);?>">网店排行榜</a>
	   		 </div>
	   	</div>
	</div>


	
